package main

import (
	"encoding/json"
	"fmt"
)

type MyStruct struct {
	MyMap map[string]string `json:"myMap"`
}

func main() {
	myStruct := MyStruct{}
	myMap := map[string]string{}
	myMap["key1"] = "value1"
	myMap["key2"] = "value2"
	myMap["key3"] = "value3"
	myMap["key4"] = "value4"
	myStruct.MyMap = myMap

	data, _ := json.Marshal(myStruct)
	fmt.Println(string(data))
	var temp = MyStruct{}
	json.Unmarshal(data, &temp)
	for k, v := range temp.MyMap {
		fmt.Println(k + " = " + v)
	}

	fmt.Println(len(""))

}
